{% set courseMembers = member.courseMembers|default([]) %}
{% for course in classroomCourses %}
    {% set courseMember = courseMembers[course.id]|default(null) %}
    <li  data-toggle="popover"
         data-trigger="hover"
         data-placement="top"
         data-html="true"
         data-delay="100"
         data-content="
                    <div><p class='mbs'>{{'classroom.manage.data_statistics.course_detail.course_name'|trans}} : {{ course.courseSetTitle }} （{{ percent(courseMember.learnedCompulsoryTaskNum|default(0), course.compulsoryTaskNum) }}）</p>
                    {% if courseMember.startLearnTime|default() %}
                        {{ 'classroom.manage.data_statistics.start_time'|trans }} : {{ courseMember.startLearnTime|date('Y-m-d H:i:s') }}<br/>
                    {% endif %}
                    {% if courseMember.finishedTime|default() %}
                        {{ 'classroom.manage.data_statistics.finished_time'|trans }} : {{ courseMember.finishedTime|date('Y-m-d H:i:s') }}<br/>
                    {% endif %}
                    </div>">
        {% if courseMember %}
            {% if courseMember.isLearned %}
              {% set colorClass = 'finish-color' %}
            {% elseif courseMember.startLearnTime %}
              {% set colorClass = 'start-color' %}
            {% else %}
              {% set colorClass = 'learn-color' %}
            {% endif %}
            <i class="{{ colorClass }}"></i>
        {% else %}
          <i class="learn-color"></i>
        {% endif %}
    </li>
{% endfor %}